-- GENERATED SPELL FOR [Abbendis] --


function spell0_20347(pUnit, Event) --@Heal,n/a--
pUnit:FullCastSpellOnTarget(35162,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20347', 656, 1)
end

function spell1_20347(pUnit, Event) --@Holy Shock,n/a--
pUnit:FullCastSpellOnTarget(35160,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20347', 597, 1)
end

function spell2_20347(pUnit, Event) --@Judgement,n/a--
pUnit:FullCastSpellOnTarget(35170,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_20347', 577, 1)
end

function Sorts_20347(pUnit, Event)
local choix_sorts_20347 = math.random(0, 2)
if choix_sorts_20347 == 0 then
pUnit:RegisterEvent('spell0_20347', 1, 1)
end
if choix_sorts_20347 == 1 then
pUnit:RegisterEvent('spell1_20347', 1, 1)
end
if choix_sorts_20347 == 2 then
pUnit:RegisterEvent('spell2_20347', 1, 1)
end
end

function mob20347_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_20347', math.random(1500, 3000), 1)
end

function mob20347_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20347_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob20347_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(20347, 1, 'mob20347_Action')
RegisterUnitEvent(20347, 2, 'mob20347_Leave')
RegisterUnitEvent(20347, 3, 'mob20347_Kill')
RegisterUnitEvent(20347, 4, 'mob20347_Die')
